package cn.highset.modules.base.entity;

import cn.highset.base.HighsetBaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.SQLDeleteAll;
import org.hibernate.annotations.Where;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;

/**
 * @author Victor
 */
@Data
@Entity
@Table(name = "t_city")
@TableName("t_city")
@SQLDelete(sql = "update t_city set del_flag= 1 where id =?")
@SQLDeleteAll(sql = "update t_city set del_flag= 1 where id =?")
@Where(clause = "del_flag=0")
@ApiModel(value = "城市表")
public class City extends HighsetBaseEntity {

    private static final long serialVersionUID = 1L;
    /**
     * 城市
     */
    @ApiModelProperty(value = "城市")
    @Column(nullable = false)
    private String label;
    /**
     * 省份ID
     */
    @ApiModelProperty(value = "省份ID")
    @Column(nullable = false)
    private String provinceId;
    @ApiModelProperty(value = "排序值")
    @Column(precision = 10, scale = 2)
    private BigDecimal sortOrder;

}
